package com.coocaa.ops.admin.v1.poster.validator;

import com.coocaa.ops.common.core.biz.poster.entity.GlobalPictureEntity;
import lombok.experimental.UtilityClass;
import org.springframework.util.Assert;

/**
 * @author bijiahao
 * @description
 * @date 2020/6/22 16:47
 */
@UtilityClass
public class PosterValidator {

    public static void valid(GlobalPictureEntity entity){
        Assert.notNull(entity.getPictureCategory(), "素材分类不能为空");
        Assert.hasText(entity.getPictureUrl(), "素材url地址不能为空");
    }
}
